//---------------------------------------------------------------------------

#ifndef prepodUnitH
#define prepodUnitH
//---------------------------------------------------------------------------
#include <System.Classes.hpp>
#include <Vcl.Controls.hpp>
#include <Vcl.StdCtrls.hpp>
#include <Vcl.Forms.hpp>
#include <Vcl.ImgList.hpp>
#include <Vcl.Menus.hpp>
#include <Vcl.Grids.hpp>
//---------------------------------------------------------------------------
class TprepodForm : public TForm
{
__published:	// IDE-managed Components
	TLabel *Label1;
	TMainMenu *MainMenu1;
	TMenuItem *N1;
	TMenuItem *N2;
	TMenuItem *N3;
	TComboBox *rating_combo;
	TButton *Button1;
	TMenuItem *N4;
	TMenuItem *N5;
	TImageList *ImageList32;
	TImageList *ImageList16;
	TLabel *Label4;
	TLabel *Label6;
	TLabel *Label10;
	TListBox *lesson_type_list;
	TStringGrid *rating_grid;
	TMenuItem *N6;
	TMenuItem *N7;
	TComboBox *study_type_combo;
	TComboBox *group_combo;
	TComboBox *mark_combo;
	TButton *Button2;
	TMemo *Memo1;
	void __fastcall N7Click(TObject *Sender);
	void __fastcall Button2Click(TObject *Sender);
	void __fastcall Button1Click(TObject *Sender);
	void __fastcall study_type_comboChange(TObject *Sender);
	void __fastcall group_comboChange(TObject *Sender);
	void __fastcall rating_comboChange(TObject *Sender);
	void __fastcall lesson_type_listClick(TObject *Sender);
	void __fastcall rating_gridSelectCell(TObject *Sender, int ACol, int ARow, bool &CanSelect);
	void __fastcall mark_comboExit(TObject *Sender);
	void __fastcall FormCreate(TObject *Sender);
	void __fastcall mark_comboChange(TObject *Sender);



private:	// User declarations
	bool tabFlag;
public:		// User declarations
	__fastcall TprepodForm(TComponent* Owner);
	int id_prepod;
	TStringList *group_id_list;
	TStringList *student_id_list;
	TStringList *study_plan_id_list;
	TStringList *step_id_list;
	TStringList *predmet_id_list;
	TStringList *mark_id_list;
	int student_count;
	int step_count;
	int mark_count;
	void update_study_type_combo();
	void update_group_combo();
	void update_rating_grid();
	void update_rating_combo();
	void update_lesson_type_list();
	void update_mark_combo();
	void update_rating_table();

	bool changed[100][100];
	bool exist[100][100];
	int id_marks[100][100];
	int id_rating[100][100];
//	int id_students[100];
//	int id_steps[100];
};
//---------------------------------------------------------------------------
extern PACKAGE TprepodForm *prepodForm;
//---------------------------------------------------------------------------
#endif
